#define paginate(currentPage, totalPage, link)
	#if(totalPage <= 1)
	#else
		<nav style="text-align: center">
			<ul class="pagination">
				#if(currentPage > 1)<li><a href="#(link)?pageNumber=#(currentPage-1)">&laquo;</a></li>#end
				#if(totalPage <= 5)
					#set(startPage=1,endPage=totalPage)
					#for(i : [startPage..endPage])
						<li #if(i == currentPage) class="active" #end><a href="#(link)?pageNumber=#(i)">#(i)</a></li>
					#end
				#else if(currentPage <= 3)
					#set(startPage=1,endPage=5)
					#for(i : [startPage..endPage])
						<li #if(i == currentPage) class="active" #end><a href="#(link)?pageNumber=#(i)">#(i)</a></li>
					#end
				#else if(currentPage <= totalPage-2)
					#set(startPage=currentPage-2,endPage=currentPage+2)
					#for(i : [startPage..endPage])
						<li #if(i == currentPage) class="active" #end><a href="#(link)?pageNumber=#(i)">#(i)</a></li>
					#end
				#else
					#set(startPage=totalPage-4,endPage=totalPage)
					#for(i : [startPage..endPage])
						<li #if(i == currentPage) class="active" #end><a href="#(link)?pageNumber=#(i)">#(i)</a></li>
					#end
				#end
				#if(currentPage < totalPage)<li><a href="#(link)?pageNumber=#(currentPage+1)">&raquo;</a></li>#end
			</ul>
		</nav>
	#end
#end